# Author: Mark Richardson
# Date started: 11/12/2022
# Date finished: 11/12/2022
# Purpose: Join the nonpartisan and partisan performance ratings
# Proofed 11/05/2023

# Load packages
library(dplyr)

# Load data
load("data/ratings/performance_ratings/04_performance_ratings_fmtd.RData")
load("data/ratings/performance_ratings/05_performance_ratings_pid_fmtd.RData")

#### Join ####

perf_ratings_org <- perf_ratings

perf_ratings <- full_join(perf_ratings_org, perf_ratings_pid)

#### Save the formatted partisan estimates ####

save(perf_ratings, file = "data/ratings/performance_ratings/07_performance_ratings_all_fmtd.RData")
haven::write_dta(perf_ratings, path = "data/ratings/performance_ratings/07_performance_ratings_all_fmtd.dta")













